<template>
  <div
    class="swipe-tip-wrapper"
  >
    <h2 class="swipe-tip">
      左右滑动可切换试题
    </h2>
    <img
      src="~assets/exam/swipeTip.png"
      class="swipe-pic"
    >
    <div
      class="swipe-btn"
      @click="onSwipeTipHide"
    >
      知道了
    </div>
  </div>
</template>

<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
  methods: {
    onSwipeTipHide () {
      this.$emit('hideTip')
      localStorage.setItem('isTestShowed', '1')
    },
  },
})
</script>

<style lang="scss" scoped>
.swipe-tip-wrapper {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 101;
  background: rgba(0, 0, 0, .5);
}
.swipe-tip {
  font-size: 32px;
  margin-bottom: 49px;
}
.swipe-pic {
  width: 392px;
}
.swipe-btn {
  margin-top: 125px;
  width: 220px;
  height: 80px;
  line-height: 80px;
  font-size: 36px;
  text-align: center;
  border: 1px solid #fff;
}
</style>
